package chapterfour;

/**
 * Created by Think on 2016/3/18.
 */
public class IrregularArray {
    public static void main(String[] args){
        int[][] arr=new int[2][]; //声明arr对象会有两个索引
        arr[0]=new int[] {1,2,3,4,5};//arr[0]是长度为5的一维数组
        arr[1]=new int[] {1,2,3};//arr[1]是长度为3的一维数组
        for(int[] row:arr){
            for(int value:row){
                System.out.printf("%2d",value);
            }
            System.out.println();
        }
    }
}
